<div class="points">
<div class="mainnav">
		<div class="nav-li first">推荐返利</div>
	</div>

	<div class="maintitle">当前位置：<span>订单金额规则</span></div>

	<div class="box">
		<table class="info">
			<thead>
				<td class="number">手机号/邮箱</td>
				<td class="price">现有订单金额</td>
				<td class="get">红利分成</td>
				<td class="method">操作</td>
			</thead>
			{{#each bus_user_bind}}
			<tr>
				<td>{{user.info.mobile_phone||user.info.email}}</td>
				<td>{{acc}}</td>
				<td>{{_money}}</td>
				<td>
					{{#if state==$Top.config.bus_user_bind_status.weishenqingduihuan}}
					<div class="info">用户并未申请兑换</div>
					{{/if}}
					{{#if state==$Top.config.bus_user_bind_status.shenqingduihuanzhong}}
					<div class="info">用户请求兑换，请将金额转到用户账上</div>
					<input type="button" event-click="{{'$Top.$Event.bus.shenqingduihuanzhong_to_shangjiayijingfukuan'}}" class="do" name="do" value="转账完成" />
					<!-- 现在默认是直接全部兑换TODO：兑换上限 -->
					{{/if}}
					{{#if state==$Top.config.bus_user_bind_status.shangjiayijingfukuan}}
					<div class="info">等待用户确认收款</div>
					{{/if}}
				</td>
			</tr>
			{{/each}}
		</table>

		<table class="rule">
			<thead>
				<td class="money"></td>
				<td class="money">订单金额</td>
				<td class="mod">返比(0.01~0.99)</td>
				<td class="method">操作</td>
			</thead>
			{{#each bus.recommend_config}}

			<tr>
				<td>{{~~$Index+1}}级规则</td>
				{{#if is_updatting==true}}
					<td><input bind-input="{{'max_price'}}" value="{{max_price}}"/></td>
					<td><input bind-input="{{'rate'}}" value="{{rate}}"/></td>
				{{#else}}
					<td>{{max_price}}</td>
					<td>{{rate}}</td>
				{{/if}}
				<td>
					<button event-click="{{'$Top.$Event.recommend_config.update'}}">{{#if is_updatting==true}}完成{{#else}}修改{{/if}}
					</button>
					<button event-click="{{'$Top.$Event.recommend_config.remove'}}">删除</button>
				</td>
			</tr>

			{{/each}}
			<tr>
				<td>添加新的规则</td>
				<td>
					<input bind-input="{{'$Cache.new_recommend_config.max_price'}}" type="text" />
				</td>
				<td>
					<input bind-input="{{'$Cache.new_recommend_config.rate'}}" type="text" />
				</td>
				<td>
					<button event-click="{{'$Top.$Event.recommend_config.add'}}">添加</button>
				</td>
			</tr>
		</table>
	</div>
</div>